﻿using System;
using System.Runtime.Serialization;

namespace CoreLibrary.Email {

    public class SendEmailException : Exception {

        public int Retries { get; set; }

        public SendEmailException() {}

        public SendEmailException(string message) : base(message) {}
        
        public SendEmailException(int retries, Exception e) : base(e.Message) {
            Retries = retries;
        }
        
        public SendEmailException(string message, int retries): base(message) {
            Retries = retries;
        }

        public SendEmailException(string message, Exception innerException) : base(message, innerException) {
        
        }

        protected SendEmailException(SerializationInfo info, StreamingContext context) : base(info, context) {
        
        }

    }
}